﻿Public Class Agreement
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
		Me.chbAccept.Attributes.Add("OnClick", "checkEnableSubmit(this,'" & Me.btnOk.ClientID & "')")
    End Sub

	Protected Sub btnCancel_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnCancel.Click
		Response.Redirect("MainPage.aspx", False)
	End Sub

	Protected Sub btnOk_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnOk.Click
		If chbAccept.Checked Then
			BL.Officer.AcceptAgreement(GlobalApp.Authen.offcier_id)
			Response.Redirect("CreateApplication.aspx", False)
		Else
			Me.Master.Alert("ท่านไม่ได้เลือกยอมรับในข้อตกลงดังกล่าว")
		End If
	End Sub
End Class